package element.synt;

import element.base.Synt;
import intermediate_representation.FuncDefRP;
import symbal.Vtype;
import table.InterCodeTable;

//MainFuncDef → 'int' 'main' '(' ')' Block
public class MainFuncDef extends Synt {
    @Override
    public void tointerRP() {
        InterCodeTable.endGlobal();
        FuncDefRP funcDefRP = new FuncDefRP("main", Vtype.INT);
        InterCodeTable.addCode(funcDefRP);
        Block block = (Block) this.getNodes().get(this.getNodes().size() - 1);
        block.tointerRP();
    }
}
